/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package uk.ac.bath.machines.bool;

import java.util.Collection;
import java.util.Vector;
import uk.ac.bath.legacy.MachineFactoryIF;
import uk.ac.bath.environment.MachineIF;
import uk.ac.bath.util.MyRandom;
import uk.ac.bath.util.Tweakable;
import uk.ac.bath.util.TweakableInt;

/**
 *
 * @author pjl
 */
public class LogicalMachineFactory implements MachineFactoryIF {
    Collection<Tweakable> tweaks=new Vector<Tweakable>();
    public TweakableInt maxOperatorsPerCell =
            new TweakableInt(tweaks, 10, 1000, 50, "MaxMachineSize");

    final public int minOperatorsPerCell = 20;


    public MachineIF createMachine() {

        int nOps = minOperatorsPerCell + MyRandom.nextInt(maxOperatorsPerCell.intValue() - minOperatorsPerCell);
        return new LogicalMachine(nOps, Palettes.full);

    }

    public Collection<Tweakable> getTweaks() {
        return tweaks;
    }

    public String toString() {
        return "Logic(01)";
    }
}
